import request from '@/utils/request';

export type CommentActionType = {
  type: 'a' | 'c';
  source: string;
};
/** 获取所有的频道列表 */
export const getCommentListApi = (params: CommentActionType) => {
  return request({
    url: '/v1_0/comments',
    params,
  });
};
// 发布评论
export type SendCommentParamsType = {
  target: string;
  content: string;
  art_id?: string;
};
export const sendCommentByIdApi = (data: SendCommentParamsType) => {
  return request({
    url: '/v1_0/comments',
    method: 'post',
    data,
  });
};
